#ifndef  _CC_IMM_IMPL_H_
#define  _CC_IMM_IMPL_H_

#include "cocos2d.h"

NS_CC_BEGIN
class CC_DLL IMMImpl
{
public:
	IMMImpl();

	~IMMImpl();

	/**
	* @brief Returns the shared IMEDispatcher object for the system.
	* @js NA
	* @lua NA
	*/
	static IMMImpl* sharedDispatcher();

	void OpenImm();
	void CloseImm();
	int ImmMessage(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
protected:
	LayerColor* getLayer(bool isCreate);
	void calcCandidateSize();
	void showCandidate();
	void closeCandidate();
	void compStr(DWORD lParam);
	void resultStr();
private:
	//HIMC _himc = 0;
	DWORD _index = 0;
	LayerColor* _layer = nullptr;
};

NS_CC_END

#endif